package com.enki.cigarettes.repository;

import com.enki.cigarettes.entity.ProductPictureT;
import org.springframework.data.domain.Sort;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

/**
 * @author WCS.Wang
 * @version V1.0
 * @Package com.enki.cigarettes.repository
 * @Name e-cigarettes-shop-api-module
 * @Description: TODO 商品附件数据层
 * @date 2019-07-19
 */
public interface ProductPictureTRepository extends PagingAndSortingRepository<ProductPictureT, String> {

    List<ProductPictureT> findByProductTIdAndIsMaster(long productTId, boolean isMaster);

    ProductPictureT findFirstByProductTIdAndIsMaster(long productTId, boolean isMaster);

    List<ProductPictureT> findByProductTId(long productTId, Sort sort);

}

